home *** CD-ROM | disk | FTP | other *** search
/ Amiga MA Magazine 1998 #6 / amigamamagazinepolishissue1998.iso / polminet / blabla / 2b_multiview / install multiview < prev    next >
Text File  |  1992-01-09  |  5KB  |  196 lines

  1. ;
  2. ; Installer script for MultiView installation
  3. ; $VER: Install_MultiView 1.0 (07.07.97) by Szczepan/SubBlaBla
  4. ;
  5. ;********* Initialisations ****************************************************
  6. ;
  7. (set MainDir            "")
  8. (set SourceDir          "")
  9. (set FileIDSourceDir    "Libs")
  10. ;
  11. ;********* Setup all the messages *********************************************
  12. ;
  13. (procedure SetupMessages
  14.  (
  15.   (set DefDocDir       "HELP:")
  16.   (set DefCatalogDir   (tackon "LOCALE:Catalogs" @language))
  17.  
  18.   (if (= @language "english")
  19.     (
  20.       (set #InstallWhat         "What do you want to install ?")
  21.       (set #InstallChoice1      "Main program")
  22.       (set #InstallChoice2      "Documentation")
  23.       (set #InstallChoice3      "FileID.library")
  24.       (set #InstallChoice4      "")
  25.       (set #SelectMainDir       "Select the directory where to copy the Main program.")
  26.       (set #CopyingMainProg     "Copying the Main program...")
  27.       (set #SelectDocDir        "Select the directory where to copy documentation.")
  28.       (set #CopyingDoc          "Copying documentation...")
  29.       (set #SelectFileIDDir     "Select the directory where to copy FileID.library.")
  30.       (set #CopyingFileID       "Copying FileID.library...")
  31.       (set #SelectCatalogDir    "Select the directory where to copy the catalog file.")
  32.       (set #CopyingCatalog      "Copying catalog file...")
  33.     )
  34.   )
  35.   (if (= @language "polski")
  36.     (
  37.       (set #InstallWhat         "Które czëôci pakietu chcesz zainstalowaê ?")
  38.       (set #InstallChoice1      "Gîówny program")
  39.       (set #InstallChoice2      "Dokumentacja")
  40.       (set #InstallChoice3      "FileID.library")
  41.       (set #InstallChoice4      "MultiView.catalog")
  42.       (set #SelectMainDir       "Wybierz katalog, do którego chcesz skopiowaê gîowny program.")
  43.       (set #CopyingMainProg     "Kopiujë gîówny program...")
  44.       (set #SelectDocDir        "Wybierz katalog, do którego chcesz skopiowaê dokumentacjë.")
  45.       (set #CopyingDoc          "Kopiujë dokumentacjë...")
  46.       (set #SelectFileIDDir     "Wybierz katalog, do którego chcesz skopiowaê FileID.library.")
  47.       (set #CopyingFileID       "Kopiujë FileID.library...")
  48.       (set #SelectCatalogDir    "Wybierz katalog, do którego chcesz skopiowaê MultiView.catalog.")
  49.       (set #CopyingCatalog      "Kopiujë MultiView.catalog...")
  50.     )
  51.   )
  52.  )
  53. )
  54. ;
  55. ;********* Install the main program *******************************************
  56. ;
  57. (procedure InstallMainProg
  58.  (
  59.   (set MainDir
  60.     (askdir
  61.       (prompt #SelectMainDir)
  62.       (help @askdir-help)
  63.       (default "SYS:Utilities")
  64.     )
  65.   )
  66.   (copyfiles
  67.     (prompt #CopyingMainprog)
  68.     (help @copyfiles-help)
  69.     (source "MultiView")
  70.     (dest MainDir)
  71.     (infos)
  72.   )
  73.  )
  74. )
  75. ;
  76. ;********* Install the Doc files **********************************************
  77. ;
  78. (procedure InstallDoc
  79.  (
  80.   (set DocDir
  81.     (askdir
  82.       (prompt #SelectDocDir)
  83.       (help @askdir-help)
  84.       (default DefDocDir)
  85.     )
  86.   )
  87.   (copyfiles
  88.     (prompt #CopyingDoc)
  89.     (help @copyfiles-help)
  90.     (source (tackon (tackon SourceDir (tackon "Docs/" @language)) "MultiView.guide"))
  91.     (dest DocDir)
  92.   )
  93.  )
  94. )
  95. ;
  96. ;********* Install FileID library ************************************************
  97. ;
  98. (procedure InstallFileID
  99.  (
  100.   (set FileIDDir
  101.     (askdir
  102.       (prompt #SelectFileIDDir)
  103.       (help @askdir-help)
  104.       (default "LIBS:")
  105.     )
  106.   )
  107.   (copylib
  108.     (prompt #CopyingFileID)
  109.     (help @copylib-help)
  110.     (source (tackon SourceDir "Libs/FileID.library"))
  111.     (dest FileIDDir)
  112.     (confirm)
  113.   )
  114.  )
  115. )
  116. ;
  117. ;********* Install the catalogs ***********************************************
  118. ;
  119. (procedure InstallCatalog
  120.  (
  121.   (set CatalogDir
  122.     (askdir
  123.       (prompt #SelectCatalogDir)
  124.       (help @askdir-help)
  125.       (default DefCatalogDir)
  126.     )
  127.   )
  128.   (copylib
  129.     (prompt #CopyingCatalog)
  130.     (help @copyfiles-help)
  131.     (source (tackon (tackon (tackon SourceDir "Locale/Catalogs") @language) "MultiView.catalog"))
  132.     (dest CatalogDir)
  133.     (confirm)
  134.   )
  135.  )
  136. )
  137. ;
  138. ;********* Start of the installation program **********************************
  139. ;
  140. (complete 0)
  141. (user 2)
  142. (set #InstallWhat "")
  143. ;
  144. ;********* Setup messages and check language
  145. ;
  146. (SetupMessages)
  147. (if (= #InstallWhat "")
  148.   (
  149.     (set langnum
  150.       (askchoice
  151.     (prompt "Which language do you speak ?")
  152.     (help @askoptions-help)
  153.     (choices "english" "polski")
  154.       )
  155.     )
  156.     (set @language (select langnum "english" "polski"))
  157.     (SetupMessages)
  158.   )
  159. )
  160. ;
  161. ;********* Displays the welcome message
  162. ;
  163. (user 0)
  164. (welcome)
  165. ;
  166. ;********* Ask which part is to be installed
  167. ;
  168. (set ToInstall
  169.   (askoptions
  170.     (prompt #InstallWhat)
  171.     (help @askoptions-help)
  172.     (if (= #InstallChoice4 "")
  173.     (choices #InstallChoice1 #InstallChoice2 #InstallChoice3)
  174.     (choices #InstallChoice1 #InstallChoice2 #InstallChoice3 #InstallChoice4)
  175.     )
  176.   )
  177. )
  178. ;
  179. ;******** Install each part
  180. ;
  181. (complete 15)
  182. (if (BITAND ToInstall  1) (InstallMainProg))
  183. (complete 30)
  184. (if (BITAND ToInstall  2) (InstallDoc))
  185. (complete 60)
  186. (if (BITAND ToInstall  4) (InstallFileID))
  187. (complete 75)
  188. (if (BITAND ToInstall  8) (InstallCatalog))
  189. (complete 90)
  190. ;
  191. ;******** End
  192. ;
  193. (complete 100)
  194. (exit)
  195.  
  196.